-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add translations of es_419
and es_ES
#22
Conversation
aa7fd2f
to
93becfc
Compare
template_str = self.resource_string(template_path) | ||
template = Template(template_str) | ||
return template.render(Context(context)) | ||
return loader.render_django_template( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add docstrings here? thanks!
es_419
and es_ES
es_419
and es_ES
93becfc
to
644ec41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deployed in one of our instances and it's working fine! Thanks
@BryanttV thanks for creating this PR. However, it appears E2E tests are failing on it. |
@ziafazal: I added xblock-utils that seem missing in the testing environment. Can we rerun the tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
This PR adds translations of
es_419
andes_ES
to the H5P XBlock.How To Test
(Account → Site Preferences → Site Language)
. Set it to "Spanish (Latin America)"Using translations commands
A
Makefile
was created that includes the necessary commands (based on the edX cookie-cutter) to extract and compile the translations.make extract_translations
, this will update the strings to be translated inh5pxblock/locale/en/LC_MESSAGES/text.po
h5pxblock/locale/
, ie:h5pxblock/locale/es_419/LC_MESSAGES/
, and create yourtext.po
file, based on the file generated above.make compile_translations
, this will generate thetext.mo
file in all created language folders.Screenshots